
import maa = module("main/org/sdmx/model/v2/base/MaintainableArtefactAdapter");
import ma = module("main/org/sdmx/model/v2/base/MaintainableArtefact");
import str = module("main/org/sdmx/model/v2/base/structure/Structure");
import is = module("main/org/sdmx/model/v2/base/InternationalString");
import mac = module("main/org/sdmx/model/v2/structure/organization/MaintenanceAgency");

/**
	* An artefact whose components are described by a Structure. In concrete
	* terms (sub-classes) an example would be a Dataflow Definition which is
	* linked to a given structure – in this case the Key Family.
	* 
	* @author Xavier Sosnovsky, Anthony Morel
	*/ 
export class StructureUsage extends maa.MaintainableArtefactAdapter	{
			
	/*==============================Fields================================*/
		
	private _structure:str.Structure;
		
	/*===========================Constructor==============================*/
		
	/**
		* Constructs a structure usage.
		*  
		* @param id
		* 		The object identifier (e.g.: CL_FREQ)
		* @param name
		* 		The object name (e.g.: Frequency code list)
		* @param maintenanceAgency
		* 		The agency responsible for maintaining the object (e.g.: ECB)
		* @param structure
		* 		The structure (e.g.: Key Family) describing the components of 
		* 		the structure usage (e.g.: the Dataflow definition)
		*/
	constructor(id:string, 
		name:is.InternationalString, 
		maintenanceAgency:mac.MaintenanceAgency, structure:str.Structure) {
		super(id, name, maintenanceAgency);
		this.setStructure(structure);
	}
		
	/*============================Accessors===============================*/
		
	/**
		* @private 
		*/
	public setStructure(structure:str.Structure) {
		this._structure = structure;
	}
		
	/**
		* The structure (e.g.: Key Family) describing the components of the
		* structure usage (e.g.: the Dataflow definition). 
		*/
	public getStructure():str.Structure {
		return this._structure;
	}
}